3.102 \(\int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt{c-c \sin (e+f x)}} \, dx\)

Optimal. Leaf size=200 \[ -\frac{2 a^3 c^2 (A+B) \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 c (A+B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac{8 a^3 (A+B) \cos (e+f x)}{f \sqrt{c-c \sin (e+f x)}}+\frac{8 \sqrt{2} a^3 (A+B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{c} f}-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}} \]

[Out]

(8*Sqrt[2]*a^3*(A + B)*ArcTanh[(Sqrt[c]*Cos[e + f*x])/(Sqrt[2]*Sqrt[c - c*Sin[e + f*x]])])/(Sqrt[c]*f) - (2*a^
3*B*c^3*Cos[e + f*x]^7)/(7*f*(c - c*Sin[e + f*x])^(7/2)) - (2*a^3*(A + B)*c^2*Cos[e + f*x]^5)/(5*f*(c - c*Sin[
e + f*x])^(5/2)) - (4*a^3*(A + B)*c*Cos[e + f*x]^3)/(3*f*(c - c*Sin[e + f*x])^(3/2)) - (8*a^3*(A + B)*Cos[e +
f*x])/(f*Sqrt[c - c*Sin[e + f*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.521297, antiderivative size = 200, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {2967, 2860, 2679, 2649, 206} \[ -\frac{2 a^3 c^2 (A+B) \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 c (A+B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac{8 a^3 (A+B) \cos (e+f x)}{f \sqrt{c-c \sin (e+f x)}}+\frac{8 \sqrt{2} a^3 (A+B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{c} f}-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}} \]

Antiderivative was successfully verified.

[In]

Int[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/Sqrt[c - c*Sin[e + f*x]],x]

[Out]

(8*Sqrt[2]*a^3*(A + B)*ArcTanh[(Sqrt[c]*Cos[e + f*x])/(Sqrt[2]*Sqrt[c - c*Sin[e + f*x]])])/(Sqrt[c]*f) - (2*a^
3*B*c^3*Cos[e + f*x]^7)/(7*f*(c - c*Sin[e + f*x])^(7/2)) - (2*a^3*(A + B)*c^2*Cos[e + f*x]^5)/(5*f*(c - c*Sin[
e + f*x])^(5/2)) - (4*a^3*(A + B)*c*Cos[e + f*x]^3)/(3*f*(c - c*Sin[e + f*x])^(3/2)) - (8*a^3*(A + B)*Cos[e +
f*x])/(f*Sqrt[c - c*Sin[e + f*x]])

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2860

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> -Simp[(d*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(f*g*(m + p + 1)), x]
+ Dist[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; Fre
eQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[m + p + 1, 0]

Rule 2679

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(g*(g*
Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + p)), x] + Dist[(g^2*(p - 1))/(a*(m + p)), Int[(g
*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0]
&& LtQ[m, -1] && GtQ[p, 1] && (GtQ[m, -2] || EqQ[2*m + p + 1, 0] || (EqQ[m, -2] && IntegerQ[p])) && NeQ[m + p,
 0] && IntegersQ[2*m, 2*p]

Rule 2649

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2/d, Subst[Int[1/(2*a - x^2), x], x, (b*C
os[c + d*x])/Sqrt[a + b*Sin[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt{c-c \sin (e+f x)}} \, dx &=\left (a^3 c^3\right ) \int \frac{\cos ^6(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{7/2}} \, dx\\ &=-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}+\left (a^3 (A+B) c^3\right ) \int \frac{\cos ^6(e+f x)}{(c-c \sin (e+f x))^{7/2}} \, dx\\ &=-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac{2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}+\left (2 a^3 (A+B) c^2\right ) \int \frac{\cos ^4(e+f x)}{(c-c \sin (e+f x))^{5/2}} \, dx\\ &=-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac{2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\left (4 a^3 (A+B) c\right ) \int \frac{\cos ^2(e+f x)}{(c-c \sin (e+f x))^{3/2}} \, dx\\ &=-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac{2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac{8 a^3 (A+B) \cos (e+f x)}{f \sqrt{c-c \sin (e+f x)}}+\left (8 a^3 (A+B)\right ) \int \frac{1}{\sqrt{c-c \sin (e+f x)}} \, dx\\ &=-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac{2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac{8 a^3 (A+B) \cos (e+f x)}{f \sqrt{c-c \sin (e+f x)}}-\frac{\left (16 a^3 (A+B)\right ) \operatorname{Subst}\left (\int \frac{1}{2 c-x^2} \, dx,x,-\frac{c \cos (e+f x)}{\sqrt{c-c \sin (e+f x)}}\right )}{f}\\ &=\frac{8 \sqrt{2} a^3 (A+B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{c} f}-\frac{2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac{2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac{4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac{8 a^3 (A+B) \cos (e+f x)}{f \sqrt{c-c \sin (e+f x)}}\\ \end{align*}

Mathematica [C]  time = 1.41376, size = 193, normalized size = 0.96 \[ -\frac{a^3 (\sin (e+f x)+1)^3 \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (-2 \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) (-(448 A+673 B) \sin (e+f x)+6 (7 A+22 B) \cos (2 (e+f x))-2086 A+15 B \sin (3 (e+f x))-2236 B)+(6720+6720 i) \sqrt [4]{-1} (A+B) \tan ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) \sqrt [4]{-1} \left (\tan \left (\frac{1}{4} (e+f x)\right )+1\right )\right )\right )}{420 f \sqrt{c-c \sin (e+f x)} \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^6} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/Sqrt[c - c*Sin[e + f*x]],x]

[Out]

-(a^3*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])*(1 + Sin[e + f*x])^3*((6720 + 6720*I)*(-1)^(1/4)*(A + B)*ArcTan[(1
/2 + I/2)*(-1)^(1/4)*(1 + Tan[(e + f*x)/4])] - 2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(-2086*A - 2236*B + 6*(
7*A + 22*B)*Cos[2*(e + f*x)] - (448*A + 673*B)*Sin[e + f*x] + 15*B*Sin[3*(e + f*x)])))/(420*f*(Cos[(e + f*x)/2
] + Sin[(e + f*x)/2])^6*Sqrt[c - c*Sin[e + f*x]])

________________________________________________________________________________________

Maple [A]  time = 1.292, size = 233, normalized size = 1.2 \begin{align*} -{\frac{ \left ( -2+2\,\sin \left ( fx+e \right ) \right ){a}^{3}}{105\,{c}^{4}\cos \left ( fx+e \right ) f}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) } \left ( 420\,{c}^{7/2}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{2}}{\sqrt{c}}} \right ) A+420\,{c}^{7/2}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{2}}{\sqrt{c}}} \right ) B-15\,B \left ( c \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) ^{7/2}-21\,A \left ( c \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) ^{5/2}c-21\,B \left ( c \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) ^{5/2}c-70\,A \left ( c \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) ^{3/2}{c}^{2}-70\,B \left ( c \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) ^{3/2}{c}^{2}-420\,A{c}^{3}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }-420\,B{c}^{3}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) } \right ){\frac{1}{\sqrt{c-c\sin \left ( fx+e \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x)

[Out]

-2/105*(-1+sin(f*x+e))*(c*(1+sin(f*x+e)))^(1/2)*a^3*(420*c^(7/2)*2^(1/2)*arctanh(1/2*(c*(1+sin(f*x+e)))^(1/2)*
2^(1/2)/c^(1/2))*A+420*c^(7/2)*2^(1/2)*arctanh(1/2*(c*(1+sin(f*x+e)))^(1/2)*2^(1/2)/c^(1/2))*B-15*B*(c*(1+sin(
f*x+e)))^(7/2)-21*A*(c*(1+sin(f*x+e)))^(5/2)*c-21*B*(c*(1+sin(f*x+e)))^(5/2)*c-70*A*(c*(1+sin(f*x+e)))^(3/2)*c
^2-70*B*(c*(1+sin(f*x+e)))^(3/2)*c^2-420*A*c^3*(c*(1+sin(f*x+e)))^(1/2)-420*B*c^3*(c*(1+sin(f*x+e)))^(1/2))/c^
4/cos(f*x+e)/(c-c*sin(f*x+e))^(1/2)/f

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \sin \left (f x + e\right ) + A\right )}{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}{\sqrt{-c \sin \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate((B*sin(f*x + e) + A)*(a*sin(f*x + e) + a)^3/sqrt(-c*sin(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [A]  time = 1.48203, size = 944, normalized size = 4.72 \begin{align*} \frac{2 \,{\left (\frac{210 \, \sqrt{2}{\left ({\left (A + B\right )} a^{3} c \cos \left (f x + e\right ) -{\left (A + B\right )} a^{3} c \sin \left (f x + e\right ) +{\left (A + B\right )} a^{3} c\right )} \log \left (-\frac{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac{2 \, \sqrt{2} \sqrt{-c \sin \left (f x + e\right ) + c}{\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt{c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt{c}} -{\left (15 \, B a^{3} \cos \left (f x + e\right )^{4} - 3 \,{\left (7 \, A + 22 \, B\right )} a^{3} \cos \left (f x + e\right )^{3} -{\left (133 \, A + 253 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} + 4 \,{\left (133 \, A + 148 \, B\right )} a^{3} \cos \left (f x + e\right ) + 4 \,{\left (161 \, A + 191 \, B\right )} a^{3} -{\left (15 \, B a^{3} \cos \left (f x + e\right )^{3} + 3 \,{\left (7 \, A + 27 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 4 \,{\left (28 \, A + 43 \, B\right )} a^{3} \cos \left (f x + e\right ) - 4 \,{\left (161 \, A + 191 \, B\right )} a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt{-c \sin \left (f x + e\right ) + c}\right )}}{105 \,{\left (c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

2/105*(210*sqrt(2)*((A + B)*a^3*c*cos(f*x + e) - (A + B)*a^3*c*sin(f*x + e) + (A + B)*a^3*c)*log(-(cos(f*x + e
)^2 + (cos(f*x + e) - 2)*sin(f*x + e) + 2*sqrt(2)*sqrt(-c*sin(f*x + e) + c)*(cos(f*x + e) + sin(f*x + e) + 1)/
sqrt(c) + 3*cos(f*x + e) + 2)/(cos(f*x + e)^2 + (cos(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2))/sqrt(c) -
 (15*B*a^3*cos(f*x + e)^4 - 3*(7*A + 22*B)*a^3*cos(f*x + e)^3 - (133*A + 253*B)*a^3*cos(f*x + e)^2 + 4*(133*A
+ 148*B)*a^3*cos(f*x + e) + 4*(161*A + 191*B)*a^3 - (15*B*a^3*cos(f*x + e)^3 + 3*(7*A + 27*B)*a^3*cos(f*x + e)
^2 - 4*(28*A + 43*B)*a^3*cos(f*x + e) - 4*(161*A + 191*B)*a^3)*sin(f*x + e))*sqrt(-c*sin(f*x + e) + c))/(c*f*c
os(f*x + e) - c*f*sin(f*x + e) + c*f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 2.04635, size = 938, normalized size = 4.69 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

1/105*(1680*sqrt(2)*(A*a^3 + B*a^3)*arctan(-1/2*sqrt(2)*(sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1
/2*e)^2 + c) - sqrt(c))/sqrt(-c))/(sqrt(-c)*sgn(tan(1/2*f*x + 1/2*e) - 1)) + ((((((((511*A*a^3*c^3*sgn(tan(1/2
*f*x + 1/2*e) - 1) + 526*B*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1))*tan(1/2*f*x + 1/2*e)/c^12 + 105*(7*A*a^3*c^3
*sgn(tan(1/2*f*x + 1/2*e) - 1) + 8*B*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1))/c^12)*tan(1/2*f*x + 1/2*e) + 7*(26
3*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 308*B*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1))/c^12)*tan(1/2*f*x + 1
/2*e) + 35*(59*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 74*B*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1))/c^12)*tan
(1/2*f*x + 1/2*e) + 35*(59*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 74*B*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1
))/c^12)*tan(1/2*f*x + 1/2*e) + 7*(263*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 308*B*a^3*c^3*sgn(tan(1/2*f*x
 + 1/2*e) - 1))/c^12)*tan(1/2*f*x + 1/2*e) + 105*(7*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 8*B*a^3*c^3*sgn(
tan(1/2*f*x + 1/2*e) - 1))/c^12)*tan(1/2*f*x + 1/2*e) + (511*A*a^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1) + 526*B*a
^3*c^3*sgn(tan(1/2*f*x + 1/2*e) - 1))/c^12)/(c*tan(1/2*f*x + 1/2*e)^2 + c)^(7/2) - 4*(420*sqrt(2)*A*a^3*c^13*a
rctan(sqrt(c)/sqrt(-c)) + 420*sqrt(2)*B*a^3*c^13*arctan(sqrt(c)/sqrt(-c)) + 161*sqrt(2)*A*a^3*sqrt(-c)*sqrt(c)
 + 191*sqrt(2)*B*a^3*sqrt(-c)*sqrt(c))*sgn(tan(1/2*f*x + 1/2*e) - 1)/(sqrt(-c)*c^13))/f